{% extends 'nav.html' %}
{% block title %}Module View{% endblock %}

{% block slideshow %}
    <br/><br/><br/>
<body>
{% if errors %}
        <ul>
            {% for error in errors %}
            <li style="color: red;">{{error}}</li>
            {% endfor %}
        </ul>
{% endif %}


    <h2>{{module.name}}</h2>
<table>
    <tr>
        <th>ISENABLED:</th>
        <td>{{ module.isenabled }}</td>
    </tr>
    <tr>
        <th>{{ module.createat }}:</th>
        <td>{{ module.createtime }}</td>
    </tr>
    <tr>
        <th>{{ module.updateat }}:</th>
        <td>{{ module.updatetime }}</td>
    </tr>
</table>
<div align="right" class="form-group"><a href="/module/add/{{ module.id }}" class="btn btn-primary">Add Module</a></div>
 <table class="table table-striped table-bordered table-hover table-condensed">
        <thead>
          <tr>
              <th>NO.</th>
              <th>Module Name</th>
              <th>IsEnabled</th>
              <th>Create At</th>
              <th>Create Time</th>
              <th>Update At</th>
              <th>Update Time</th>
          <th></th>
          </tr>
        </thead>
        <tbody>
          {% for module in modulelist %}
            <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ module.name }}</td>
                <td>{{ module.isenabled }}</td>
                <td>{{ module.createat }}</td>
                <td>{{ module.createtime }}</td>
                <td>{{ module.createat }}</td>
                <td>{{ module.updatetime }}</td>
                <th>
                    <a href="{% url 'moduleupdate' module.id %}" class="btn btn-primary" role="button">Edit</a>
                    <a href="{% url 'moduledel' module.id %}" class="btn btn-primary" role="button" onclick="return confirm('Are you Sure Deleted.')">Delete</a>
                </th>
            </tr>
          {% endfor %}
        </tbody>
      </table>
<p><button onclick="goback();" class="btn btn-success" role="button">返回>></button></p>
</body>
{% endblock %}